Skip to content

Conversation

@j-luong
Copy link
Contributor

@j-luong j-luong commented Jan 8, 2026

Pull Request Submission Checklist

  • Follows CONTRIBUTING guidelines
  • Commit messages
    are release-note ready, emphasizing
    what was changed, not how.
  • Includes detailed description of changes
  • Contains risk assessment (Low | Medium | High)
  • Highlights breaking API changes (if applicable)
  • Links to automated tests covering new functionality
  • Includes manual testing instructions (if necessary)
  • Updates relevant GitBook documentation (PR link: ___)
  • Includes product update to be announced in the next stable release notes

What does this PR do?

Adds exit code mapping for the MaintenanceError Error Catalog error.

Where should the reviewer start?

How should this be manually tested?

What's the product update that needs to be communicated to CLI users?

@j-luong j-luong mentioned this pull request Jan 8, 2026
9 tasks
@j-luong j-luong force-pushed the chore/CLI-1268_maintenanceErrExitCode branch 2 times, most recently from a3f7df3 to 6bd606d Compare January 8, 2026 14:41
@j-luong j-luong marked this pull request as ready for review January 8, 2026 14:41
@j-luong j-luong requested review from a team as code owners January 8, 2026 14:41
@j-luong j-luong force-pushed the chore/CLI-1268_maintenanceErrExitCode branch 15 times, most recently from 95f8ab1 to 20e2f5f Compare January 13, 2026 14:54
@j-luong j-luong force-pushed the chore/CLI-1268_maintenanceErrExitCode branch 2 times, most recently from 650d84f to 9118aee Compare January 14, 2026 10:19
@j-luong j-luong force-pushed the chore/CLI-1268_maintenanceErrExitCode branch from 9118aee to dc74c57 Compare January 14, 2026 13:44
);

describe('Special error cases', () => {
describe('network retries', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Should this test that focusses on the network retry logic be in error-catalog.spec.ts? Seems more reasonable to move it to its own file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the existing https.spec.ts be more suitable? If not, I'll create a new file - network.spec.ts.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https.spec.ts would be okay for now. maybe we want to combine all network related tests at some point?!

},
);

describe('maintenance error [SNYK-0099]', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: This test looks very much alike like this, why don't we just merge them. We basically just need to add the additional assertion on the request counts to the other test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the setup is quite similar. The separation is due to the test, testing network retries based on error catalog errors doesn't make sense in the exitcode.spec.ts file.

Alternatively, this test can be moved to network.spec.ts if needed

@j-luong j-luong force-pushed the chore/CLI-1268_maintenanceErrExitCode branch from dc74c57 to 874ba61 Compare January 15, 2026 11:10
@j-luong j-luong force-pushed the chore/CLI-1268_maintenanceErrExitCode branch 2 times, most recently from 9226cb2 to 4e275ec Compare January 15, 2026 12:22
@j-luong j-luong force-pushed the chore/CLI-1268_maintenanceErrExitCode branch 2 times, most recently from 4db41de to 56bd8a4 Compare January 15, 2026 12:37
@j-luong j-luong force-pushed the chore/CLI-1268_maintenanceErrExitCode branch from 56bd8a4 to 522cf42 Compare January 15, 2026 12:39
@j-luong j-luong merged commit 79ca236 into main Jan 15, 2026
6 checks passed
@j-luong j-luong deleted the chore/CLI-1268_maintenanceErrExitCode branch January 15, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants